home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 January: Mac OS SDK / Dev.CD Jan 96 SDK / Dev.CD Jan 96 SDK1.toast / Development Kits (Disc 1) / MacODBC / ODBC Tools / SampleTranslate / MAKEFILE
Encoding:
Text File  |  1995-03-31  |  5.1 KB  |  148 lines  |  [TEXT/MPS ]

  1. # MAKEFILE
  2. # Build script for the 'ODBC Sample Data Translate' shared library (DLL).
  3. # Execute "Buildprogram All" from your MPW Worksheet. Make sure the SourceFolder,
  4. # ObjectsFolder and other variables are set to the correct paths first, tho.
  5. # The variables CDefs, LibDefs and BSLDefs are intended to be set from the worksheet,
  6. # and can be used to add options to the MPW C, Lib and BuildSharedLibrary tools.
  7.  
  8. SourceFolder        =    :Sources:
  9. ObjectsFolder        =    :Objects:
  10. binaries            =    ::binaries:
  11.  
  12. ODBCincludes        =    ::Include:
  13.  
  14. ODBCLibs            =    ::LIB:
  15. InternalLibs        =    ::InternalLibraries:
  16. InternalIncludes    =    ::InternalIncludes:
  17.  
  18.  
  19. {ObjectsFolder}    ƒ    {SourceFolder}
  20.  
  21. DBMStranslateIncludes    =    -i "{ODBCincludes}"                                        ∂
  22.                             -i "{SourceFolder}"                                        ∂
  23.                             -i "{InternalIncludes}"                                    ∂
  24.                             -i "{SLMInterfaces}CIncludes:"
  25.                         
  26. BSLIncludes                =    -i "{ODBCincludes}"                                        ∂
  27.                             -i "{SourceFolder}"                                        ∂
  28.                         
  29. RezIncludes                =    -i "{ODBCincludes}"                                        ∂
  30.                             -i "{SourceFolder}"                                        ∂
  31.                             -i "{SLMInterfaces}Rincludes:"
  32.  
  33. COptions                =    {CDefs} -r -b2 -model far             ∂
  34.                             -d MACODBC=1 -d PPCODBC=0             ∂
  35.                             {DBMStranslateIncludes}                            
  36.  
  37. PPCOptions                =    -AppleExt On -char unsigned         ∂
  38.                             -d MACODBC=1 -d PPCODBC=1             ∂
  39.                             {DBMStranslateIncludes} {PPCDefs}
  40.  
  41. OBJECTS                    =    "{ObjectsFolder}ODBCdataTranslate.c.o"                    ∂
  42.                             "{ObjectsFolder}ConfigTranslator.c.o"
  43.                             #"{ObjectsFolder}DialogUtilities.c.o"
  44.                             
  45. XOBJECTS                =    "{ObjectsFolder}ODBCdataTranslate.c.xo"                    ∂
  46.                             "{ObjectsFolder}ConfigTranslator.c.xo"
  47.                             #"{ObjectsFolder}DialogUtilities.c.xo"
  48.                             
  49. RezSources                =    {SourceFolder}ODBCdataTranslate.r
  50. RezXSources                =    {SourceFolder}ODBCdataTranslatePPC.r
  51.  
  52. all        ƒ    68k ppc
  53. 68k        ƒ    "{binaries}ODBC Sample Translate"
  54. ppc        ƒ    "{binaries}ODBC Sample Translate PPC"
  55.  
  56. clean        ƒ
  57.     delete -i    {OBJECTS}                                                            ∂
  58.                 "{ObjectsFolder}ODBCdataTranslate.o"                                ∂
  59.                 "{ObjectsFolder}ODBCdataTranslate.RSRC"                                ∂
  60.                 "{binaries}ODBC Sample Translate"                                    ∂
  61.                 "{ObjectsFolder}ODBC Sample Translate.SYM"                            ∂
  62.                 "{binaries}ODBC Sample Translate PPC"                                ∂
  63.                 "{ObjectsFolder}ODBC Sample Translate PPC.xSYM"                        ∂
  64.                 {ObjectsFolder}SampleTranslate.xcoff                                ∂
  65.                 {XOBJECTS}
  66.                 
  67.  
  68. .c.o ƒ .c
  69.     echo -- C {DepDir}{Default}.c -o {Targ} {Coptions}
  70.     C {DepDir}{Default}.c -o {Targ} {Coptions}
  71.  
  72. .c.xo ƒ .c
  73.     echo -- ppcc {DepDir}{Default}.c -o {Targ} {PPCOptions}
  74.     ppcc {DepDir}{Default}.c -o {Targ} {PPCOptions}
  75.  
  76. "{ObjectsFolder}ODBCdataTranslate.RSRC"    ƒ    {ObjectsFolder}ODBCdataTranslate.o        ∂
  77.                                             {SourceFolder}ODBCdataTranslate.exp
  78.     BuildSharedLibrary    {ObjectsFolder}ODBCdataTranslate.o                            ∂
  79.         -obj    {ObjectsFolder}ODBCdataTranslate                                    ∂
  80.         -lib    "{ObjectsFolder}ODBCdataTranslate.RSRC"                                ∂
  81.         -exp    {SourceFolder}ODBCdataTranslate.exp                                    ∂
  82.         -far    {ObjectsFolder}ODBCdataTranslate.cl.o                                ∂
  83.         -near    {ObjectsFolder}ODBCdataTranslate.cln.o                                ∂
  84.         {BSLIncludes}                                                                ∂
  85.         -symfile "{ObjectsFolder}ODBC Sample Translate.SYM"                            ∂
  86.         {BSLDefs}                                                                    ∂
  87.                 "{SLMLibraries}LibraryManager.o"                                    ∂
  88.                 "{Libraries}Runtime.o"                                                ∂
  89.                 "{Libraries}Interface.o"
  90.  
  91. "{binaries}ODBC Sample Translate"    ƒƒ    {RezSources}                                    ∂
  92.                                     "{ObjectsFolder}ODBCdataTranslate.RSRC"
  93.     rez -o {Targ} -t libr -c OMGR                                                    ∂
  94.         -a -ov Types.r MPWTypes.r SysTypes.r                                        ∂
  95.         {RezIncludes}                                                                ∂
  96.         -s "{ObjectsFolder}"                                                        ∂
  97.         {RezSources}
  98.     echo "INCLUDE ∂"{ObjectsFolder}ODBCdataTranslate.RSRC∂";" |    rez -a -o {Targ}
  99.  
  100.  
  101. {ObjectsFolder}ODBCdataTranslate.o        ƒ    {OBJECTS} "{InternalLibs}"Utilities.o
  102.     Lib {LibDefs} -o {ObjectsFolder}ODBCdataTranslate.o    {OBJECTS}                    ∂
  103.         "{InternalLibs}"Utilities.o
  104.  
  105.  
  106. #______ ppc build __________________________________________
  107.  
  108. {ObjectsFolder}SampleTranslate.xcoff ƒ    {XOBJECTS}                                    ∂
  109.                                         "{InternalLibs}"Utilities.xo                ∂
  110.                                         "{ODBCLibs}"ODBCConfigMgr.xcoff                ∂
  111.                                         "{SourceFolder}"ODBCdataTranslate.x
  112.     echo -- PPCLink {targ}...
  113.     PPCLink -sym on -xm Sharedlibrary ∂
  114.             -export "`convertexportlist {SourceFolder}ODBCdataTranslate.x`" ∂
  115.             -main SampleTranslateMain ∂
  116.             {XOBJECTS} ∂
  117.             "{InternalLibs}"Utilities.xo ∂
  118.             "{ODBCLibs}"ODBCConfigMgr.xcoff ∂
  119.             "{PPCLibraries}"InterfaceLib.xcoff ∂
  120.             "{PPCLibraries}"MathLib.xcoff ∂
  121.             "{PPCLibraries}"StdCLib.xcoff ∂
  122.             "{PPCLibraries}"StdCRuntime.o ∂
  123.             "{PPCLibraries}"PPCCRuntime.o ∂
  124.             -o {ObjectsFolder}SampleTranslate.xcoff
  125.     setfile -c R2Db {ObjectsFolder}SampleTranslate.xcoff
  126.  
  127. "{binaries}ODBC Sample Translate PPC" ƒƒ {ObjectsFolder}SampleTranslate.xcoff
  128.     echo -- MakePEF {targ}...
  129.     MakePEF {Deps} -o {Targ} ∂
  130.                     -l SampleTranslate.xcoff=vsi:ODBC$SampleTranslate ∂
  131.                     -l ODBCConfigMgr.xcoff=vsi:ODBC$ConfigMgr ∂
  132.                     -l InterfaceLib.xcoff=InterfaceLib ∂
  133.                     -l MathLib.xcoff=MathLib ∂
  134.                     -l StdCLib.xcoff=StdCLib ∂
  135.                     -ft 'shlb' -fc 'cfmg' ∂
  136.                     -i SampleTranslateInit -t SampleTranslateObit
  137.  
  138. "{binaries}ODBC Sample Translate PPC" ƒƒ {RezSources} {RezXSources}
  139.     echo -- Rez {targ}...
  140.     rez -a -o {Targ}                            ∂
  141.         Types.r MPWTypes.r SysTypes.r            ∂
  142.         balloontypes.r                            ∂
  143.         {RezIncludes}                            ∂
  144.         {RezSources} {RezXSources}
  145.